import AsyncStorage from '@react-native-community/async-storage';

class DeviceStorage {
  static get(key) {
    return AsyncStorage.getItem(key).then(value => {
      return value;
    });
  }

  static save(key, value) {
    return AsyncStorage.setItem(key, value);
  }

  static delete(key) {
    return AsyncStorage.removeItem(key);
  }
}

export default DeviceStorage;
// 使用实例
// Storage.get('appHotSearchTagList').then((tags) => {
//   this.setState({
//     tags: tags
//   })
// });
